import request from '@/utils/request'
import request1 from '@/utils/request1'

export function getGoodsData(query) {
  return request({
    url: '/goods',
    method: 'post',
    params: query
  })
}

export function getClassifyList() {
  return request({
    url: '/getGoodsCate',
    method: 'get'
  })
}

// 获取套餐列表
export function getGoodsList(query) {
  return request({
    url: '/com.mmk.groupmember.api.AdminMmkGroupVipComboProvider/1.0.0/getList.html',
    method: 'post',
    data: query
  })
}

// 添加套餐
export function addGoods(query) {
  return request({
    url: '/com.mmk.groupmember.api.AdminMmkGroupVipComboProvider/1.0.0/insertCombo.html',
    method: 'post',
    data: query
  })
}

// 修改套餐-状态
export function updateGoodsStatus(query) {
  return request({
    url: '/com.mmk.groupmember.api.AdminMmkGroupVipComboProvider/1.0.0/statusCombo.html',
    method: 'post',
    data: query
  })
}

// 修改套餐是否推送到服务端小程序
export function updateGoodsServerShow(query) {
  return request({
    url: '/com.mmk.groupmember.api.AdminMmkGroupVipComboProvider/1.0.0/statusServerShow.html',
    method: 'post',
    data: query
  })
}

// 修改套餐
export function updateGoods(query) {
  return request({
    url: '/com.mmk.groupmember.api.AdminMmkGroupVipComboProvider/1.0.0/updateCombo.html',
    method: 'post',
    data: query
  })
}

// 删除套餐
export function deleteGoods(query) {
  return request({
    url: '/com.mmk.groupmember.api.AdminMmkGroupVipComboProvider/1.0.0/delete.html',
    method: 'post',
    data: query
  })
}

//商品关联卡券- 卡券下拉列表
export function goodsTicketList(query) {
  return request1({
    url: '/admin/card_ticket/goods_ticket_list',
    method: 'post',
    data: query
  })
}

//商品详情
export function goodsDetail(query) {
  return request({
    url: '/com.mmk.groupmember.api.AdminMmkGroupVipComboProvider/1.0.0/getDetail.html',
    method: 'post',
    data: query
  })
}
